<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pepr3D: D:/Home/MFF/1-Mgr/projekt/pepr3d/src/geometry/Geometry.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pepr3d_icon.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pepr3D
   &#160;<span id="projectnumber">v1.0</span>
   </div>
   <div id="projectbrief">Pepr3D is a 3D graphics editor designed for FDM printing</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_geometry_8h_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Geometry.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;CGAL/AABB_traits.h&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;CGAL/AABB_tree.h&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;CGAL/Surface_mesh.h&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;CGAL/exceptions.h&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;CGAL/mesh_segmentation.h&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;cinder/Ray.h&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;cinder/gl/gl.h&gt;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;cereal/types/array.hpp&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;cereal/types/map.hpp&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;cereal/types/vector.hpp&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;cinder/Log.h&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;map&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;optional&gt;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;unordered_map&gt;</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;geometry/ColorManager.h&quot;</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &quot;geometry/GeometryProgress.h&quot;</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &quot;geometry/GlmSerialization.h&quot;</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &quot;geometry/ModelImporter.h&quot;</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;geometry/PolyhedronData.h&quot;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;geometry/Triangle.h&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;geometry/TriangleDetail.h&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;geometry/TrianglePrimitive.h&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;peprassert.h&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;tools/Brush.h&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacepepr3d.html">pepr3d</a> {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html">   34</a></span>&#160;<span class="keyword">class </span><a class="code" href="classpepr3d_1_1_geometry.html">Geometry</a> {</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;   <span class="keyword">public</span>:</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keyword">using</span> Direction = pepr3d::DataTriangle::K::Direction_3;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keyword">using</span> Circle = DataTriangle::K::Circle_3;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keyword">using</span> Sphere = DataTriangle::K::Sphere_3;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keyword">using</span> Line3 = DataTriangle::K::Line_3;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keyword">using</span> Vector3 = pepr3d::DataTriangle::K::Vector_3;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keyword">using</span> Point3 = pepr3d::DataTriangle::K::Point_3;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keyword">using</span> Ft = pepr3d::DataTriangle::K::FT;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keyword">using</span> Ray = pepr3d::DataTriangle::K::Ray_3;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keyword">using</span> My_AABB_traits = CGAL::AABB_traits&lt;pepr3d::DataTriangle::K, DataTriangleAABBPrimitive&gt;;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keyword">using</span> Tree = CGAL::AABB_tree&lt;My_AABB_traits&gt;;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keyword">using</span> Ray_intersection = boost::optional&lt;Tree::Intersection_and_primitive_id&lt;Ray&gt;::Type&gt;;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keyword">using</span> BoundingBox = My_AABB_traits::Bounding_box;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keyword">using</span> ColorIndex = GLuint;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_geometry_1_1_area_highlight.html">   51</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="structpepr3d_1_1_geometry_1_1_area_highlight.html">AreaHighlight</a> {</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        <span class="comment">// all the triangles in highlight</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        std::set&lt;size_t&gt; triangles;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <a class="code" href="structpepr3d_1_1_brush_settings.html">BrushSettings</a> settings;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        ci::Ray ray;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        glm::vec3 origin{};</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        glm::vec3 direction{};</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keywordtype">double</span> size{};</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordtype">bool</span> enabled{};</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_geometry_1_1_area_highlight.html#a129df0b43636f676500fdf0beb3cd021">   61</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="structpepr3d_1_1_geometry_1_1_area_highlight.html#a129df0b43636f676500fdf0beb3cd021">dirty</a>{<span class="keyword">true</span>};</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    };</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html">   65</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html">OpenGlData</a> {</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ae087e1484346b1ef7af7f04e6d745745">   68</a></span>&#160;        std::vector&lt;glm::vec3&gt; <a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ae087e1484346b1ef7af7f04e6d745745">vertexBuffer</a>;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#a5741e251aec5d181e48fbf2d9e56112d">   73</a></span>&#160;        std::vector&lt;ColorIndex&gt; <a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#a5741e251aec5d181e48fbf2d9e56112d">colorBuffer</a>;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ab1e3327043c8d4e8924495db62eb2ad9">   77</a></span>&#160;        std::vector&lt;glm::vec3&gt; <a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ab1e3327043c8d4e8924495db62eb2ad9">normalBuffer</a>;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ad66b73ae688939f518a57411a9f02671">   80</a></span>&#160;        std::vector&lt;uint32_t&gt; <a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ad66b73ae688939f518a57411a9f02671">indexBuffer</a>;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#a8c61b7f1139d0a7fa632ab221546e81b">   84</a></span>&#160;        std::vector&lt;GLint&gt; <a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#a8c61b7f1139d0a7fa632ab221546e81b">highlightMask</a>;  <span class="comment">// Possibly needs to be GLint, had problems getting GLbyte through cinder</span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keywordtype">bool</span> isDirty{<span class="keyword">true</span>};</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_geometry_1_1_open_gl_data_1_1_info.html">   91</a></span>&#160;        <span class="keyword">struct </span><a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data_1_1_info.html">Info</a> {</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;            <span class="keyword">mutable</span> <span class="keywordtype">bool</span> didColorUpdate{<span class="keyword">false</span>};</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            <span class="keyword">mutable</span> <span class="keywordtype">bool</span> didHighlightUpdate{<span class="keyword">false</span>};</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;            <span class="keywordtype">void</span> unsetColorFlag()<span class="keyword"> const </span>{</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                didColorUpdate = <span class="keyword">false</span>;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;            }</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            <span class="keywordtype">void</span> unsetHighlightFlag()<span class="keyword"> const </span>{</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                didHighlightUpdate = <span class="keyword">false</span>;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;            }</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        } info;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    };</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;   <span class="keyword">private</span>:</div><div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">  107</a></span>&#160;    std::vector&lt;DataTriangle&gt; <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a2ab785869db636d7dc75d192cbd34c30">  112</a></span>&#160;    std::vector&lt;std::pair&lt;Point3, double&gt;&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a2ab785869db636d7dc75d192cbd34c30">mTriangleBounds</a>;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a899b65a3e64dc086f6275e4a5b616b62">  115</a></span>&#160;    std::map&lt;size_t, TriangleDetail&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a899b65a3e64dc086f6275e4a5b616b62">mTriangleDetails</a>;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#aee03bb37cbf326e4594b58edacbc17c0">  118</a></span>&#160;    std::map&lt;size_t, size_t&gt; <a class="code" href="classpepr3d_1_1_geometry.html#aee03bb37cbf326e4594b58edacbc17c0">mTriangleDetailColorBufferStart</a>;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">  121</a></span>&#160;    <a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html">OpenGlData</a> <a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">  124</a></span>&#160;    <a class="code" href="structpepr3d_1_1_polyhedron_data.html">PolyhedronData</a> <a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#ab9f70b2e8bbd7a9baa001b981c6215aa">  127</a></span>&#160;    std::unique_ptr&lt;Tree&gt; <a class="code" href="classpepr3d_1_1_geometry.html#ab9f70b2e8bbd7a9baa001b981c6215aa">mTree</a>;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a1108d0993ef23fb246ae10244a0c2240">  131</a></span>&#160;    std::unique_ptr&lt;Tree&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a1108d0993ef23fb246ae10244a0c2240">mTreeDetailed</a>;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="comment">// ----- Detailed Mesh Data ------</span></div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a73e2b6c74082b59b5d99d58e018e5bff">  136</a></span>&#160;    std::unique_ptr&lt;PolyhedronData::Mesh&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a73e2b6c74082b59b5d99d58e018e5bff">mMeshDetailed</a>;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    std::unordered_map&lt;DetailedTriangleId, PolyhedronData::face_descriptor&gt; mMeshDetailedFaceDescs;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#adf2777044b00de455536e8bc0efc3b07">  141</a></span>&#160;    PolyhedronData::Mesh::Property_map&lt;PolyhedronData::face_descriptor, DetailedTriangleId&gt; <a class="code" href="classpepr3d_1_1_geometry.html#adf2777044b00de455536e8bc0efc3b07">mMeshDetailedIdMap</a>;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <span class="comment">// ----- END of Detailed Mesh Data ------</span></div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#af247be6afb090aa4edecb32786103ae1">  146</a></span>&#160;    std::unique_ptr&lt;BoundingBox&gt; <a class="code" href="classpepr3d_1_1_geometry.html#af247be6afb090aa4edecb32786103ae1">mBoundingBox</a>;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a435bf3487105e8fb7867614845d69885">  149</a></span>&#160;    <a class="code" href="classpepr3d_1_1_color_manager.html">ColorManager</a> <a class="code" href="classpepr3d_1_1_geometry.html#a435bf3487105e8fb7867614845d69885">mColorManager</a>;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a47baed18f665dbbe1c69b9b400ace85c">  152</a></span>&#160;    <a class="code" href="structpepr3d_1_1_geometry_1_1_area_highlight.html">AreaHighlight</a> <a class="code" href="classpepr3d_1_1_geometry.html#a47baed18f665dbbe1c69b9b400ace85c">mAreaHighlight</a>;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a0bf613cec3cd854058e183f199542ada">  155</a></span>&#160;    std::unique_ptr&lt;GeometryProgress&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a0bf613cec3cd854058e183f199542ada">mProgress</a>;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_geometry_1_1_geometry_state.html">  157</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="structpepr3d_1_1_geometry_1_1_geometry_state.html">GeometryState</a> {</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        std::vector&lt;size_t&gt; triangleColors;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        std::map&lt;size_t, TriangleDetail&gt; triangleDetails;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        ColorManager::ColorMap colorMap;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    };</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span>cereal::access;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;   <span class="keyword">public</span>:</div><div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#ad9cad69d72176d09ebb2f345ca862b01">  167</a></span>&#160;    <a class="code" href="classpepr3d_1_1_geometry.html#ad9cad69d72176d09ebb2f345ca862b01">Geometry</a>() : <a class="code" href="classpepr3d_1_1_geometry.html#ab9f70b2e8bbd7a9baa001b981c6215aa">mTree</a>(std::make_unique&lt;Tree&gt;()), <a class="code" href="classpepr3d_1_1_geometry.html#a0bf613cec3cd854058e183f199542ada">mProgress</a>(std::make_unique&lt;<a class="code" href="structpepr3d_1_1_geometry_progress.html">GeometryProgress</a>&gt;()) {}</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <a class="code" href="classpepr3d_1_1_geometry.html#ad9cad69d72176d09ebb2f345ca862b01">Geometry</a>(std::vector&lt;DataTriangle&gt;&amp;&amp; triangles)</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        : <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>(std::move(triangles)), <a class="code" href="classpepr3d_1_1_geometry.html#a0bf613cec3cd854058e183f199542ada">mProgress</a>(std::make_unique&lt;<a class="code" href="structpepr3d_1_1_geometry_progress.html">GeometryProgress</a>&gt;()) {</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#a3c89c3e2f698d1cb25ad68767b90efc3">generateVertexBuffer</a>();</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#a1f4435ad35840859cbb4dd949af46845">generateTriangleBounds</a>();</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#ac0ccbc4a83e4eeaa61fd3a7de4e0e7a9">generateIndexBuffer</a>();</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#a93545e8dae1b2cfee74fbd8c7e203389">generateColorBuffer</a>();</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#a7d69aae6b0c09c7727d170af8b8b99b2">generateNormalBuffer</a>();</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.<a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ad66b73ae688939f518a57411a9f02671">indexBuffer</a>.size() == <a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.<a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ae087e1484346b1ef7af7f04e6d745745">vertexBuffer</a>.size());</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#aff6b12b0be4f64925e3a9aa88b85bb09">buildTree</a>();</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#a11091a0db475dc20b6635f17afb07b23">buildDetailedTree</a>();</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#ab9f70b2e8bbd7a9baa001b981c6215aa">mTree</a>-&gt;size() == <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>.size());</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        <span class="keywordflow">if</span>(!<a class="code" href="classpepr3d_1_1_geometry.html#ab9f70b2e8bbd7a9baa001b981c6215aa">mTree</a>-&gt;empty()) {</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;            <a class="code" href="classpepr3d_1_1_geometry.html#af247be6afb090aa4edecb32786103ae1">mBoundingBox</a> = std::make_unique&lt;BoundingBox&gt;(<a class="code" href="classpepr3d_1_1_geometry.html#ab9f70b2e8bbd7a9baa001b981c6215aa">mTree</a>-&gt;bbox());</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        }</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    }</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    std::vector&lt;glm::vec3&gt;&amp; getVertexBuffer() {</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.<a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ae087e1484346b1ef7af7f04e6d745745">vertexBuffer</a>;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    }</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <span class="keywordtype">bool</span> polyhedronValid()<span class="keyword"> const </span>{</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a27477466ca362daaf66ed853405cf959">mMesh</a>.is_valid() &amp;&amp; <a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.valid &amp;&amp; !<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a27477466ca362daaf66ed853405cf959">mMesh</a>.is_empty();</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    }</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="keywordtype">size_t</span> polyVertCount()<span class="keyword"> const </span>{</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a83aa9807ec5b6b95395d281dfe788086">vertices</a>.size();</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    }</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    <span class="keyword">const</span> OpenGlData&amp; getOpenGlData()<span class="keyword"> const </span>{</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <span class="comment">// Since we use a new vertex for each triangle, we should have vertices == triangles</span></div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.<a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ad66b73ae688939f518a57411a9f02671">indexBuffer</a>.size() == <a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.<a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ae087e1484346b1ef7af7f04e6d745745">vertexBuffer</a>.size());</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.<a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ae087e1484346b1ef7af7f04e6d745745">vertexBuffer</a>.size() == <a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.<a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ab1e3327043c8d4e8924495db62eb2ad9">normalBuffer</a>.size());</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        P_ASSERT(!<a class="code" href="classpepr3d_1_1_geometry.html#a47baed18f665dbbe1c69b9b400ace85c">mAreaHighlight</a>.enabled || (<a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.<a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#a8c61b7f1139d0a7fa632ab221546e81b">highlightMask</a>.size() == <a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.<a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ae087e1484346b1ef7af7f04e6d745745">vertexBuffer</a>.size()));</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.<a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#a5741e251aec5d181e48fbf2d9e56112d">colorBuffer</a>.size() == <a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.<a class="code" href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ae087e1484346b1ef7af7f04e6d745745">vertexBuffer</a>.size());</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    }</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div><div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a1550192711eb10ddb685c08d15ef9922">  209</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a1550192711eb10ddb685c08d15ef9922">updateOpenGlBuffers</a>() {</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.isDirty);  <span class="comment">// Called unnecessarily. Most likely by error.</span></div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        <span class="keyword">const</span> <span class="keyword">auto</span> start = std::chrono::high_resolution_clock::now();</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#a3c89c3e2f698d1cb25ad68767b90efc3">generateVertexBuffer</a>();</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#ac0ccbc4a83e4eeaa61fd3a7de4e0e7a9">generateIndexBuffer</a>();</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#a93545e8dae1b2cfee74fbd8c7e203389">generateColorBuffer</a>();</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#a7d69aae6b0c09c7727d170af8b8b99b2">generateNormalBuffer</a>();</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#a36740d72ad8b50c81f39ad506fa0281e">generateHighlightBuffer</a>();</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.isDirty = <span class="keyword">false</span>;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.info.didColorUpdate = <span class="keyword">false</span>;</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.info.didHighlightUpdate = <span class="keyword">false</span>;</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;        <span class="keyword">const</span> <span class="keyword">auto</span> end = std::chrono::high_resolution_clock::now();</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;        std::chrono::duration&lt;double, std::milli&gt; timeMs = end - start;</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        CI_LOG_I(<span class="stringliteral">&quot;Generating buffers took &quot;</span> + std::to_string(timeMs.count()) + <span class="stringliteral">&quot; ms&quot;</span>);</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    }</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#ad25fda5afe4c73c0fd9dbd4bf77952b1">updateTemporaryDetailedData</a>();</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <span class="keywordtype">bool</span> isTemporaryDetailedDataValid()<span class="keyword"> const </span>{</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#a73e2b6c74082b59b5d99d58e018e5bff">mMeshDetailed</a> &amp;&amp; <a class="code" href="classpepr3d_1_1_geometry.html#a1108d0993ef23fb246ae10244a0c2240">mTreeDetailed</a>;</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    }</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    glm::vec3 getBoundingBoxMin()<span class="keyword"> const </span>{</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        <span class="keywordflow">if</span>(!<a class="code" href="classpepr3d_1_1_geometry.html#af247be6afb090aa4edecb32786103ae1">mBoundingBox</a>) {</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;            <span class="keywordflow">return</span> glm::vec3(0);</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;        }</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        <span class="keywordflow">return</span> glm::vec3(<a class="code" href="classpepr3d_1_1_geometry.html#af247be6afb090aa4edecb32786103ae1">mBoundingBox</a>-&gt;xmin(), <a class="code" href="classpepr3d_1_1_geometry.html#af247be6afb090aa4edecb32786103ae1">mBoundingBox</a>-&gt;ymin(), <a class="code" href="classpepr3d_1_1_geometry.html#af247be6afb090aa4edecb32786103ae1">mBoundingBox</a>-&gt;zmin());</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    }</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    glm::vec3 getBoundingBoxMax()<span class="keyword"> const </span>{</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        <span class="keywordflow">if</span>(!<a class="code" href="classpepr3d_1_1_geometry.html#af247be6afb090aa4edecb32786103ae1">mBoundingBox</a>) {</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;            <span class="keywordflow">return</span> glm::vec3(0);</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        }</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        <span class="keywordflow">return</span> glm::vec3(<a class="code" href="classpepr3d_1_1_geometry.html#af247be6afb090aa4edecb32786103ae1">mBoundingBox</a>-&gt;xmax(), <a class="code" href="classpepr3d_1_1_geometry.html#af247be6afb090aa4edecb32786103ae1">mBoundingBox</a>-&gt;ymax(), <a class="code" href="classpepr3d_1_1_geometry.html#af247be6afb090aa4edecb32786103ae1">mBoundingBox</a>-&gt;zmax());</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    }</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    <span class="keyword">const</span> Geometry::AreaHighlight&amp; getAreaHighlight()<span class="keyword"> const </span>{</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#a47baed18f665dbbe1c69b9b400ace85c">mAreaHighlight</a>;</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;    }</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    <span class="keywordtype">void</span> hideHighlight() {</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#a47baed18f665dbbe1c69b9b400ace85c">mAreaHighlight</a>.enabled = <span class="keyword">false</span>;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;    }</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    <span class="keyword">const</span> DataTriangle&amp; getTriangle(<span class="keyword">const</span> <span class="keywordtype">size_t</span> triangleIndex)<span class="keyword"> const </span>{</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;        P_ASSERT(triangleIndex &lt; <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>.size());</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>[triangleIndex];</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    }</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    <span class="keyword">const</span> DataTriangle&amp; getTriangle(<span class="keyword">const</span> DetailedTriangleId triangleId)<span class="keyword"> const </span>{</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">size_t</span> baseId = triangleId.getBaseId();</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        <span class="keyword">const</span> std::optional&lt;size_t&gt; detailId = triangleId.getDetailId();</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        P_ASSERT(baseId &lt; <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>.size());</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        <span class="keywordflow">if</span>(detailId) {</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;            P_ASSERT(!isSimpleTriangle(baseId));</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;            P_ASSERT(*detailId &lt; <a class="code" href="classpepr3d_1_1_geometry.html#aa084c208c8fcb9802d5afd68e72b527d">getTriangleDetailCount</a>(baseId));</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#a899b65a3e64dc086f6275e4a5b616b62">mTriangleDetails</a>.at(baseId).getTriangles()[*detailId];</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>[baseId];</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        }</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    }</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    <span class="keywordtype">size_t</span> getTriangleColor(<span class="keyword">const</span> <span class="keywordtype">size_t</span> triangleIndex)<span class="keyword"> const </span>{</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        <span class="keywordflow">return</span> getTriangle(triangleIndex).getColor();</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    }</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    <span class="keywordtype">size_t</span> getTriangleColor(<span class="keyword">const</span> DetailedTriangleId triangleId)<span class="keyword"> const </span>{</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        <span class="keywordflow">return</span> getTriangle(triangleId).getColor();</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    }</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;</div><div class="line"><a name="l00288"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#acca576cfa8a735ecfe36e4fca67204d8">  288</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classpepr3d_1_1_geometry.html#acca576cfa8a735ecfe36e4fca67204d8">getTriangleCount</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>.size();</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    }</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <span class="keyword">const</span> <a class="code" href="classpepr3d_1_1_color_manager.html">ColorManager</a>&amp; getColorManager()<span class="keyword"> const </span>{</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#a435bf3487105e8fb7867614845d69885">mColorManager</a>;</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;    }</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;    ColorManager&amp; getColorManager() {</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#a435bf3487105e8fb7867614845d69885">mColorManager</a>;</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;    }</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;    <span class="keywordtype">bool</span> isSimpleTriangle(<span class="keywordtype">size_t</span> triangleIdx)<span class="keyword"> const </span>{</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;        <span class="comment">// Triangle is single color when it has no detail triangles</span></div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;        <span class="keyword">auto</span> it = <a class="code" href="classpepr3d_1_1_geometry.html#a899b65a3e64dc086f6275e4a5b616b62">mTriangleDetails</a>.find(triangleIdx);</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;        <span class="keywordflow">return</span> it == <a class="code" href="classpepr3d_1_1_geometry.html#a899b65a3e64dc086f6275e4a5b616b62">mTriangleDetails</a>.end();</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;    }</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;    <span class="keyword">const</span> GeometryProgress&amp; getProgress()<span class="keyword"> const </span>{</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;        P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#a0bf613cec3cd854058e183f199542ada">mProgress</a> != <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;        <span class="keywordflow">return</span> *<a class="code" href="classpepr3d_1_1_geometry.html#a0bf613cec3cd854058e183f199542ada">mProgress</a>;</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    }</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;    GeometryProgress&amp; getProgress() {</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;        P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#a0bf613cec3cd854058e183f199542ada">mProgress</a> != <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;        <span class="keywordflow">return</span> *<a class="code" href="classpepr3d_1_1_geometry.html#a0bf613cec3cd854058e183f199542ada">mProgress</a>;</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;    }</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    PolyhedronData::Mesh* getMeshDetailed()<span class="keyword"> const </span>{</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#a73e2b6c74082b59b5d99d58e018e5bff">mMeshDetailed</a>.get();</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;    }</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    <span class="keyword">const</span> std::unordered_map&lt;DetailedTriangleId, PolyhedronData::face_descriptor&gt;&amp; getMeshDetailedFaceDescs()<span class="keyword"> const </span>{</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        <span class="keywordflow">return</span> mMeshDetailedFaceDescs;</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;    }</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;    <span class="keyword">const</span> PolyhedronData::Mesh::Property_map&lt;PolyhedronData::face_descriptor, DetailedTriangleId&gt;&amp;</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    getMeshDetailedIdMap()<span class="keyword"> const </span>{</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#adf2777044b00de455536e8bc0efc3b07">mMeshDetailedIdMap</a>;</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;    }</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a027715ec109b060ffc8b420947c4fde0">loadNewGeometry</a>(<span class="keyword">const</span> std::string&amp; fileName);</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#aa473f80280346656024fc494994c065e">setTriangleColor</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> triangleIndex, <span class="keyword">const</span> <span class="keywordtype">size_t</span> newColor);</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#aa473f80280346656024fc494994c065e">setTriangleColor</a>(<span class="keyword">const</span> DetailedTriangleId triangleId, <span class="keyword">const</span> <span class="keywordtype">size_t</span> newColor);</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    std::optional&lt;size_t&gt; <a class="code" href="classpepr3d_1_1_geometry.html#ace58dc7a4182240000e9b773cb8da4ee">intersectMesh</a>(<span class="keyword">const</span> ci::Ray&amp; ray) <span class="keyword">const</span>;</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;    std::optional&lt;size_t&gt; <a class="code" href="classpepr3d_1_1_geometry.html#ace58dc7a4182240000e9b773cb8da4ee">intersectMesh</a>(<span class="keyword">const</span> ci::Ray&amp; ray, glm::vec3&amp; outPos) <span class="keyword">const</span>;</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    std::optional&lt;DetailedTriangleId&gt; <a class="code" href="classpepr3d_1_1_geometry.html#ae68a633ab4ab435156e0b03e64c9ede9">intersectDetailedMesh</a>(<span class="keyword">const</span> ci::Ray&amp; ray);</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a69f784973726ce83893d8ec3fcdf9ff1">highlightArea</a>(<span class="keyword">const</span> ci::Ray&amp; ray, <span class="keyword">const</span> <span class="keyword">struct</span> BrushSettings&amp; settings);</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a6c6b8ef6f157f8bb818e38f6e2e49b37">paintWithShape</a>(<span class="keyword">const</span> ci::Ray&amp; ray, <span class="keyword">const</span> std::vector&lt;Point3&gt;&amp; shape, <span class="keywordtype">size_t</span> color,</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;                        <span class="keywordtype">bool</span> paintBackfaces = <span class="keyword">false</span>);</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;</div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a6c6b8ef6f157f8bb818e38f6e2e49b37">paintWithShape</a>(<span class="keyword">const</span> ci::Ray&amp; ray, <span class="keyword">const</span> std::vector&lt;DataTriangle::Triangle&gt;&amp; triangles, <span class="keywordtype">size_t</span> color);</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#ab4593a2aa8017add96d6cd7e177a0cf1">paintAreaWithSphere</a>(<span class="keyword">const</span> ci::Ray&amp; ray, <span class="keyword">const</span> BrushSettings&amp; settings);</div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ColorFunc&gt;</div><div class="line"><a name="l00371"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#ae6d2ae86fca37592a5dbb93784ca4ef0">  371</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#ae6d2ae86fca37592a5dbb93784ca4ef0">changeColorIds</a>(<span class="keyword">const</span> ColorFunc&amp; colorFunc) {</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0; i &lt; <a class="code" href="classpepr3d_1_1_geometry.html#acca576cfa8a735ecfe36e4fca67204d8">getTriangleCount</a>(); ++i) {</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;            <span class="keywordflow">if</span>(isSimpleTriangle(i)) {</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;                <span class="keyword">const</span> <span class="keyword">auto</span>&amp; triangle = getTriangle(i);</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;                <a class="code" href="classpepr3d_1_1_geometry.html#aa473f80280346656024fc494994c065e">setTriangleColor</a>(i, colorFunc(triangle.getColor()));</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;            } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;                <a class="code" href="classpepr3d_1_1_triangle_detail.html">TriangleDetail</a>* triDetail = getTriangleDetail(i);</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;                triDetail-&gt;<a class="code" href="classpepr3d_1_1_triangle_detail.html#a9bce9da8bea065df486537a2933f635c">changeColorIds</a>(colorFunc);</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;            }</div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;        }</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">mOgl</a>.isDirty = <span class="keyword">true</span>;</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    }</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;    GeometryState <a class="code" href="classpepr3d_1_1_geometry.html#a80198ecc7f17d1db360ab2bf50b7f594">saveState</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#aebe9b03fabcd1d3fca4108eaf34c6e70">loadState</a>(<span class="keyword">const</span> GeometryState&amp;);</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;    std::vector&lt;DetailedTriangleId&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a4a49d4588081ba91381fbd86e3837e75">bucket</a>(<span class="keyword">const</span> <a class="code" href="structpepr3d_1_1_detailed_triangle_id.html">DetailedTriangleId</a> startTriangle,</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;                                           <span class="keyword">const</span> StoppingCondition&amp; stopFunctor);</div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;    std::vector&lt;size_t&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a4a49d4588081ba91381fbd86e3837e75">bucket</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> startTriangle, <span class="keyword">const</span> StoppingCondition&amp; stopFunctor);</div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;</div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;    std::vector&lt;size_t&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a4a49d4588081ba91381fbd86e3837e75">bucket</a>(<span class="keyword">const</span> std::vector&lt;size_t&gt;&amp; startTriangles, <span class="keyword">const</span> StoppingCondition&amp; stopFunctor);</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;</div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;    std::vector&lt;size_t&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a1d420e96bc8c92c620b5473677173d81">getTrianglesUnderBrush</a>(<span class="keyword">const</span> glm::vec3&amp; originPoint, <span class="keyword">const</span> glm::vec3&amp; insideDirection,</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;                                               <span class="keywordtype">size_t</span> startTriangle, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structpepr3d_1_1_brush_settings.html">BrushSettings</a>&amp; settings);</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> Object&gt;</div><div class="line"><a name="l00412"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a4907bc6f193156a3d68956b2ce622120">  412</a></span>&#160;    std::vector&lt;size_t&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a4907bc6f193156a3d68956b2ce622120">getTrianglesInRadius</a>(<span class="keyword">const</span> Object&amp; <span class="keywordtype">object</span>, <span class="keywordtype">double</span> radius)<span class="keyword"> const </span>{</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;        P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#a2ab785869db636d7dc75d192cbd34c30">mTriangleBounds</a>.size() == <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>.size());</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;        std::vector&lt;size_t&gt; result;</div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> triIdx = 0; triIdx &lt; <a class="code" href="classpepr3d_1_1_geometry.html#a2ab785869db636d7dc75d192cbd34c30">mTriangleBounds</a>.size(); ++triIdx) {</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;            <span class="keywordflow">if</span>(<a class="code" href="classpepr3d_1_1_geometry.html#a993a7383980e9c4aa955ae156d714f15">isTriangleInRadius</a>(<span class="keywordtype">object</span>, radius, triIdx))</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;                result.push_back(triIdx);</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;        }</div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;        <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;    }</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> Object&gt;</div><div class="line"><a name="l00428"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a993a7383980e9c4aa955ae156d714f15">  428</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classpepr3d_1_1_geometry.html#a993a7383980e9c4aa955ae156d714f15">isTriangleInRadius</a>(<span class="keyword">const</span> Object&amp; <span class="keywordtype">object</span>, <span class="keywordtype">double</span> radius, <span class="keywordtype">size_t</span> triangleIdx)<span class="keyword"> const </span>{</div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;        P_ASSERT(triangleIdx &lt; <a class="code" href="classpepr3d_1_1_geometry.html#a2ab785869db636d7dc75d192cbd34c30">mTriangleBounds</a>.size());</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;        P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#a2ab785869db636d7dc75d192cbd34c30">mTriangleBounds</a>.size() == <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>.size());</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;        <span class="keyword">const</span> Point3&amp; sphereCenter = <a class="code" href="classpepr3d_1_1_geometry.html#a2ab785869db636d7dc75d192cbd34c30">mTriangleBounds</a>[triangleIdx].first;</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">double</span> sphereRadius = <a class="code" href="classpepr3d_1_1_geometry.html#a2ab785869db636d7dc75d192cbd34c30">mTriangleBounds</a>[triangleIdx].second;</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;        <span class="comment">// Any sphere in contact with the cylinder is going to have this max squared distance</span></div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">double</span> distanceLimitSquared = (radius + sphereRadius) * (radius + sphereRadius);</div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;        <span class="keywordflow">if</span>(CGAL::squared_distance(<span class="keywordtype">object</span>, sphereCenter) &lt;= distanceLimitSquared) {</div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;        }</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;    }</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;</div><div class="line"><a name="l00447"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#abba4d7a86b23f0d1a5aef9739d087f7d">  447</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#abba4d7a86b23f0d1a5aef9739d087f7d">computeSdfValues</a>() {</div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;        computeSdf();</div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;    }</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;</div><div class="line"><a name="l00452"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a4acf91e1482adf0a1a77d03c23c108b3">  452</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classpepr3d_1_1_geometry.html#a4acf91e1482adf0a1a77d03c23c108b3">isSdfComputed</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a18c628197dc544d7a79b636792783c31">sdf_property_map</a> == <span class="keyword">nullptr</span>) {</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;            P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a9cd3b6704df3fb8caae2bd938e6d7de8">indices</a>.size() == static_cast&lt;size_t&gt;(<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a18c628197dc544d7a79b636792783c31">sdf_property_map</a>.end() -</div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;                                                                           <a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a18c628197dc544d7a79b636792783c31">sdf_property_map</a>.begin()));</div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.isSdfComputed;</div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;        }</div><div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;    }</div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;</div><div class="line"><a name="l00463"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#ab4ef6e071146e7fd4e06c26dac3ffb43">  463</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classpepr3d_1_1_geometry.html#ab4ef6e071146e7fd4e06c26dac3ffb43">segmentation</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> numberOfClusters, <span class="keyword">const</span> <span class="keywordtype">float</span> smoothingLambda,</div><div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;                        std::map&lt;<span class="keywordtype">size_t</span>, std::vector&lt;size_t&gt;&gt;&amp; segmentToTriangleIds,</div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;                        std::unordered_map&lt;size_t, size_t&gt;&amp; triangleToSegmentMap) {</div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;        <span class="keywordflow">return</span> segment(numberOfClusters, smoothingLambda, segmentToTriangleIds, triangleToSegmentMap);</div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;    }</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;</div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;    <span class="keywordtype">double</span> getSdfValue(<span class="keyword">const</span> <span class="keywordtype">size_t</span> triangleIndex)<span class="keyword"> const </span>{</div><div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;        P_ASSERT(triangleIndex &lt; <a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a405c876987a078bc168f267972b46514">mFaceDescs</a>.size());</div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;        P_ASSERT(triangleIndex &lt; <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>.size());</div><div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;        PolyhedronData::face_descriptor faceDescForTri = <a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a405c876987a078bc168f267972b46514">mFaceDescs</a>[triangleIndex];</div><div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a18c628197dc544d7a79b636792783c31">sdf_property_map</a>[faceDescForTri];</div><div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;    }</div><div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;</div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a7671cab77f226a80cbea5703aba2026c">recomputeFromData</a>();</div><div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;</div><div class="line"><a name="l00479"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#aa084c208c8fcb9802d5afd68e72b527d">  479</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classpepr3d_1_1_geometry.html#aa084c208c8fcb9802d5afd68e72b527d">getTriangleDetailCount</a>(<span class="keyword">const</span> <a class="code" href="structpepr3d_1_1_detailed_triangle_id.html">DetailedTriangleId</a> triangleIndex)<span class="keyword"> const </span>{</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classpepr3d_1_1_geometry.html#aa084c208c8fcb9802d5afd68e72b527d">getTriangleDetailCount</a>(triangleIndex.getBaseId());</div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;    }</div><div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;</div><div class="line"><a name="l00484"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#aa82245c699bf946457e251ad1176926c">  484</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classpepr3d_1_1_geometry.html#aa82245c699bf946457e251ad1176926c">getTriangleDetailCount</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> triangleIndex)<span class="keyword"> const </span>{</div><div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;        <span class="keyword">auto</span> it = <a class="code" href="classpepr3d_1_1_geometry.html#a899b65a3e64dc086f6275e4a5b616b62">mTriangleDetails</a>.find(triangleIndex);</div><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;        <span class="keywordflow">if</span>(it == <a class="code" href="classpepr3d_1_1_geometry.html#a899b65a3e64dc086f6275e4a5b616b62">mTriangleDetails</a>.end()) {</div><div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;            <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;            <span class="keywordflow">return</span> it-&gt;second.getTriangles().size();</div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;        }</div><div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;    }</div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;</div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">bool</span>* sdfValuesValid()<span class="keyword"> const </span>{</div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;        <span class="keywordflow">return</span> &amp;<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.sdfValuesValid;</div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;    }</div><div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;</div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;   <span class="keyword">private</span>:</div><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a3c89c3e2f698d1cb25ad68767b90efc3">generateVertexBuffer</a>();</div><div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;</div><div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#ac0ccbc4a83e4eeaa61fd3a7de4e0e7a9">generateIndexBuffer</a>();</div><div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;</div><div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a93545e8dae1b2cfee74fbd8c7e203389">generateColorBuffer</a>();</div><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;</div><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a7d69aae6b0c09c7727d170af8b8b99b2">generateNormalBuffer</a>();</div><div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;</div><div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a36740d72ad8b50c81f39ad506fa0281e">generateHighlightBuffer</a>();</div><div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;</div><div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a1f4435ad35840859cbb4dd949af46845">generateTriangleBounds</a>();</div><div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;</div><div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a9ffaaaa3702f7505206f4e45aebfd4a9">buildPolyhedron</a>();</div><div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;</div><div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#aff6b12b0be4f64925e3a9aa88b85bb09">buildTree</a>();</div><div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;</div><div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a11091a0db475dc20b6635f17afb07b23">buildDetailedTree</a>();</div><div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;</div><div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a5f0594ebe7f3a779dc9cf18f943f1c56">buildDetailedMesh</a>();</div><div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;</div><div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#aa981414573779195fbfb7a64cfcbc1f1">correctSharedVertices</a>();</div><div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;</div><div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a69f341b26bd3ebd9158648b7d35ffa10">invalidateTemporaryDetailedData</a>();</div><div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;</div><div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;    TriangleDetail* createTriangleDetail(<span class="keywordtype">size_t</span> triangleIdx);</div><div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;</div><div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;    TriangleDetail* getTriangleDetail(<span class="keyword">const</span> <span class="keywordtype">size_t</span> triangleIndex) {</div><div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;        <span class="keyword">auto</span> it = <a class="code" href="classpepr3d_1_1_geometry.html#a899b65a3e64dc086f6275e4a5b616b62">mTriangleDetails</a>.find(triangleIndex);</div><div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;        <span class="keywordflow">if</span>(it == <a class="code" href="classpepr3d_1_1_geometry.html#a899b65a3e64dc086f6275e4a5b616b62">mTriangleDetails</a>.end()) {</div><div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;            <span class="keywordflow">return</span> createTriangleDetail(triangleIndex);</div><div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;            <span class="keywordflow">return</span> &amp;(it-&gt;second);</div><div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;        }</div><div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;    }</div><div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;</div><div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;    <span class="keywordtype">void</span> removeTriangleDetail(<span class="keywordtype">size_t</span> triangleIndex);</div><div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;</div><div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;    std::array&lt;int, 3&gt; <a class="code" href="classpepr3d_1_1_geometry.html#aeabf9a91453ddd3d744ccbc862583874">gatherNeighbours</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> triIndex) <span class="keyword">const</span>;</div><div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;</div><div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;    std::array&lt;std::optional&lt;DetailedTriangleId&gt;, 3&gt; <a class="code" href="classpepr3d_1_1_geometry.html#aeabf9a91453ddd3d744ccbc862583874">gatherNeighbours</a>(<span class="keyword">const</span> DetailedTriangleId triIndex) <span class="keyword">const</span>;</div><div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;</div><div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#ae361aadf7f7b305ec57f7d0c3f5ec076">addNeighboursToQueue</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> currentVertex, std::unordered_set&lt;size_t&gt;&amp; alreadyVisited,</div><div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;                              std::deque&lt;size_t&gt;&amp; toVisit, <span class="keyword">const</span> StoppingCondition&amp; stopFunctor) <span class="keyword">const</span>;</div><div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;</div><div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#ae361aadf7f7b305ec57f7d0c3f5ec076">addNeighboursToQueue</a>(<span class="keyword">const</span> DetailedTriangleId currentVertex,</div><div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;                              std::unordered_set&lt;DetailedTriangleId&gt;&amp; alreadyVisited,</div><div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;                              std::deque&lt;DetailedTriangleId&gt;&amp; toVisit, <span class="keyword">const</span> StoppingCondition&amp; stopFunctor) <span class="keyword">const</span>;</div><div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;</div><div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;    <span class="keywordtype">void</span> computeSdf();</div><div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;</div><div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;    <span class="keywordtype">size_t</span> segment(<span class="keyword">const</span> <span class="keywordtype">int</span> numberOfClusters, <span class="keyword">const</span> <span class="keywordtype">float</span> smoothingLambda,</div><div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;                   std::map&lt;<span class="keywordtype">size_t</span>, std::vector&lt;size_t&gt;&gt;&amp; segmentToTriangleIds,</div><div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;                   std::unordered_map&lt;size_t, size_t&gt;&amp; triangleToSegmentMap);</div><div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;</div><div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> Archive&gt;</div><div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a531c94e0221f47462af2c9b5f0961e56">save</a>(Archive&amp; saveArchive) <span class="keyword">const</span>;</div><div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;</div><div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> Archive&gt;</div><div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a2a8b9b75eb5033c9af30570ace03e921">load</a>(Archive&amp; loadArchive);</div><div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;</div><div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;    std::vector&lt;size_t&gt; bucketSpread(<span class="keyword">const</span> StoppingCondition&amp; stopFunctor, std::deque&lt;size_t&gt;&amp; toVisit,</div><div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;                                     std::unordered_set&lt;size_t&gt;&amp; alreadyVisited);</div><div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;</div><div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;    std::vector&lt;DetailedTriangleId&gt; bucketSpread(<span class="keyword">const</span> StoppingCondition&amp; stopFunctor,</div><div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;                                                 std::deque&lt;DetailedTriangleId&gt;&amp; toVisit,</div><div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;                                                 std::unordered_set&lt;DetailedTriangleId&gt;&amp; alreadyVisited);</div><div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;};</div><div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;</div><div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;std::vector&lt;size_t&gt; Geometry::bucketSpread(<span class="keyword">const</span> StoppingCondition&amp; stopFunctor, std::deque&lt;size_t&gt;&amp; toVisit,</div><div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;                                           std::unordered_set&lt;size_t&gt;&amp; alreadyVisited) {</div><div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;    std::vector&lt;size_t&gt; trianglesToColor;</div><div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;    P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a9cd3b6704df3fb8caae2bd938e6d7de8">indices</a>.size() == <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>.size());</div><div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;</div><div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;    <span class="keywordflow">while</span>(!toVisit.empty()) {</div><div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;        <span class="comment">// Remove yourself from queue and mark visited</span></div><div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">size_t</span> currentVertex = toVisit.front();</div><div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;        toVisit.pop_front();</div><div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;        P_ASSERT(alreadyVisited.find(currentVertex) != alreadyVisited.end());</div><div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;        P_ASSERT(currentVertex &lt; <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>.size());</div><div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;        P_ASSERT(toVisit.size() &lt; <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>.size());</div><div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;</div><div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;        <span class="comment">// Catching because of unpredictable CGAL errors</span></div><div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;        <span class="keywordflow">try</span> {</div><div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;            <span class="comment">// Manage neighbours and grow the queue</span></div><div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;            <a class="code" href="classpepr3d_1_1_geometry.html#ae361aadf7f7b305ec57f7d0c3f5ec076">addNeighboursToQueue</a>(currentVertex, alreadyVisited, toVisit, stopFunctor);</div><div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;        } <span class="keywordflow">catch</span>(CGAL::Assertion_exception&amp; excp) {</div><div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;            CI_LOG_E(<span class="stringliteral">&quot;Exception caught. Returning immediately. &quot;</span> + excp.expression() + <span class="stringliteral">&quot; &quot;</span> + excp.message());</div><div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;            <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;Bucket spread failed inside the CGAL library.&quot;</span>);</div><div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;        }</div><div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;</div><div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;        <span class="comment">// Add the triangle to the list</span></div><div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;        trianglesToColor.push_back(currentVertex);</div><div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;    }</div><div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;    <span class="keywordflow">return</span> trianglesToColor;</div><div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;}</div><div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;</div><div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;std::vector&lt;DetailedTriangleId&gt; Geometry::bucketSpread(<span class="keyword">const</span> StoppingCondition&amp; stopFunctor,</div><div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;                                                       std::deque&lt;DetailedTriangleId&gt;&amp; toVisit,</div><div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;                                                       std::unordered_set&lt;DetailedTriangleId&gt;&amp; alreadyVisited) {</div><div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;    P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#a73e2b6c74082b59b5d99d58e018e5bff">mMeshDetailed</a>);</div><div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;    std::vector&lt;DetailedTriangleId&gt; trianglesToColor;</div><div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;</div><div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;    <span class="keywordflow">while</span>(!toVisit.empty()) {</div><div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;        <span class="comment">// Remove yourself from queue and mark visited</span></div><div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;        <span class="keyword">const</span> DetailedTriangleId currentVertex = toVisit.front();</div><div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;        toVisit.pop_front();</div><div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;        P_ASSERT(alreadyVisited.find(currentVertex) != alreadyVisited.end());</div><div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;        P_ASSERT(currentVertex.getBaseId() &lt; <a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>.size());</div><div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;        P_ASSERT(currentVertex.getDetailId() &lt; <a class="code" href="classpepr3d_1_1_geometry.html#aa084c208c8fcb9802d5afd68e72b527d">getTriangleDetailCount</a>(currentVertex));</div><div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;</div><div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;        <span class="comment">// Catching because of unpredictable CGAL errors</span></div><div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;        <span class="keywordflow">try</span> {</div><div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160;            <span class="comment">// Manage neighbours and grow the queue</span></div><div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;            <a class="code" href="classpepr3d_1_1_geometry.html#ae361aadf7f7b305ec57f7d0c3f5ec076">addNeighboursToQueue</a>(currentVertex, alreadyVisited, toVisit, stopFunctor);</div><div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;        } <span class="keywordflow">catch</span>(CGAL::Assertion_exception* excp) {</div><div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;            <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;Exception caught. Returning immediately. &quot;</span> + excp-&gt;expression() + <span class="stringliteral">&quot; &quot;</span> +</div><div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;                                     excp-&gt;message());</div><div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;        }</div><div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;</div><div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;        <span class="comment">// Add the triangle to the list</span></div><div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;        trianglesToColor.push_back(currentVertex);</div><div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;    }</div><div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;    <span class="keywordflow">return</span> trianglesToColor;</div><div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;}</div><div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;</div><div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00653"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a4a49d4588081ba91381fbd86e3837e75">  653</a></span>&#160;std::vector&lt;DetailedTriangleId&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a4a49d4588081ba91381fbd86e3837e75">Geometry::bucket</a>(<span class="keyword">const</span> <a class="code" href="structpepr3d_1_1_detailed_triangle_id.html">DetailedTriangleId</a> startTriangle,</div><div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;                                                 <span class="keyword">const</span> StoppingCondition&amp; stopFunctor) {</div><div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a27477466ca362daaf66ed853405cf959">mMesh</a>.is_empty()) {</div><div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;        <span class="keywordflow">return</span> {};</div><div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;    }</div><div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;</div><div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;    <span class="keywordflow">if</span>(!isTemporaryDetailedDataValid()) {</div><div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;        <a class="code" href="classpepr3d_1_1_geometry.html#ad25fda5afe4c73c0fd9dbd4bf77952b1">updateTemporaryDetailedData</a>();</div><div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;        P_ASSERT(<a class="code" href="classpepr3d_1_1_geometry.html#a73e2b6c74082b59b5d99d58e018e5bff">mMeshDetailed</a>);</div><div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;    }</div><div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;</div><div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;    std::deque&lt;DetailedTriangleId&gt; toVisit;</div><div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;    <span class="keyword">const</span> <a class="code" href="structpepr3d_1_1_detailed_triangle_id.html">DetailedTriangleId</a> startingFace = startTriangle;</div><div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;    toVisit.push_back(startingFace);</div><div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;</div><div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;    std::unordered_set&lt;DetailedTriangleId&gt; alreadyVisited;</div><div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;    alreadyVisited.insert(startingFace);</div><div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;</div><div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;    <span class="keywordflow">return</span> bucketSpread(stopFunctor, toVisit, alreadyVisited);</div><div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;}</div><div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;</div><div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;std::vector&lt;size_t&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a4a49d4588081ba91381fbd86e3837e75">Geometry::bucket</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> startTriangle, <span class="keyword">const</span> StoppingCondition&amp; stopFunctor) {</div><div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a27477466ca362daaf66ed853405cf959">mMesh</a>.is_empty()) {</div><div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;        <span class="keywordflow">return</span> {};</div><div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;    }</div><div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;</div><div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;    std::deque&lt;size_t&gt; toVisit;</div><div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">size_t</span> startingFace = startTriangle;</div><div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;    toVisit.push_back(startingFace);</div><div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;</div><div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;    std::unordered_set&lt;size_t&gt; alreadyVisited;</div><div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;    alreadyVisited.insert(startingFace);</div><div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;</div><div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;    <span class="keywordflow">return</span> bucketSpread(stopFunctor, toVisit, alreadyVisited);</div><div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;}</div><div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;</div><div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;std::vector&lt;size_t&gt; <a class="code" href="classpepr3d_1_1_geometry.html#a4a49d4588081ba91381fbd86e3837e75">Geometry::bucket</a>(<span class="keyword">const</span> std::vector&lt;size_t&gt;&amp; startingTriangles,</div><div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;                                     <span class="keyword">const</span> StoppingCondition&amp; stopFunctor) {</div><div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a27477466ca362daaf66ed853405cf959">mMesh</a>.is_empty()) {</div><div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;        <span class="keywordflow">return</span> {};</div><div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;    }</div><div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;</div><div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;    std::deque&lt;size_t&gt; toVisit;</div><div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;    std::unordered_set&lt;size_t&gt; alreadyVisited;</div><div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;</div><div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;    <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> startTriangle : startingTriangles) {</div><div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;        toVisit.push_back(startTriangle);</div><div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;        alreadyVisited.insert(startTriangle);</div><div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;    }</div><div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;</div><div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;    <span class="keywordflow">return</span> bucketSpread(stopFunctor, toVisit, alreadyVisited);</div><div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;}</div><div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;</div><div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00709"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#ae361aadf7f7b305ec57f7d0c3f5ec076">  709</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#ae361aadf7f7b305ec57f7d0c3f5ec076">Geometry::addNeighboursToQueue</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> currentVertex, std::unordered_set&lt;size_t&gt;&amp; alreadyVisited,</div><div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;                                    std::deque&lt;size_t&gt;&amp; toVisit, <span class="keyword">const</span> StoppingCondition&amp; stopFunctor)<span class="keyword"> const </span>{</div><div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;    <span class="keyword">const</span> std::array&lt;int, 3&gt; neighbours = <a class="code" href="classpepr3d_1_1_geometry.html#aeabf9a91453ddd3d744ccbc862583874">gatherNeighbours</a>(currentVertex);</div><div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; 3; ++i) {</div><div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;        <span class="keywordflow">if</span>(neighbours[i] == -1) {</div><div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;            <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;            <span class="keywordflow">if</span>(alreadyVisited.find(neighbours[i]) == alreadyVisited.end()) {</div><div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;                <span class="comment">// New vertex -&gt; visit it.</span></div><div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;                <span class="keywordflow">if</span>(stopFunctor(neighbours[i], currentVertex)) {</div><div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;                    toVisit.push_back(neighbours[i]);</div><div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;                    alreadyVisited.insert(neighbours[i]);</div><div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;                }</div><div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;            }</div><div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;        }</div><div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;    }</div><div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;}</div><div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;</div><div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> StoppingCondition&gt;</div><div class="line"><a name="l00728"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a598ec7cc38c6849908d97fb1ee482db5">  728</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#ae361aadf7f7b305ec57f7d0c3f5ec076">Geometry::addNeighboursToQueue</a>(<span class="keyword">const</span> <a class="code" href="structpepr3d_1_1_detailed_triangle_id.html">DetailedTriangleId</a> currentVertex,</div><div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;                                    std::unordered_set&lt;DetailedTriangleId&gt;&amp; alreadyVisited,</div><div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;                                    std::deque&lt;DetailedTriangleId&gt;&amp; toVisit,</div><div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;                                    <span class="keyword">const</span> StoppingCondition&amp; stopFunctor)<span class="keyword"> const </span>{</div><div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;    std::array&lt;std::optional&lt;DetailedTriangleId&gt;, 3&gt; neighbours = <a class="code" href="classpepr3d_1_1_geometry.html#aeabf9a91453ddd3d744ccbc862583874">gatherNeighbours</a>(currentVertex);</div><div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; 3; ++i) {</div><div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;        <span class="keywordflow">if</span>(!neighbours[i]) {</div><div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;            <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;            <span class="keywordflow">if</span>(alreadyVisited.find(*neighbours[i]) == alreadyVisited.end()) {</div><div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;                <span class="comment">// New vertex -&gt; visit it.</span></div><div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;                <span class="keywordflow">if</span>(stopFunctor(*neighbours[i], currentVertex)) {</div><div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;                    toVisit.push_back(*neighbours[i]);</div><div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;                    alreadyVisited.insert(*neighbours[i]);</div><div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;                }</div><div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;            }</div><div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;        }</div><div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;    }</div><div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;}</div><div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;</div><div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;<span class="comment">/* -------------------- Serialization -------------------- */</span></div><div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;</div><div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> Archive&gt;</div><div class="line"><a name="l00751"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a531c94e0221f47462af2c9b5f0961e56">  751</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a531c94e0221f47462af2c9b5f0961e56">Geometry::save</a>(Archive&amp; saveArchive)<span class="keyword"> const </span>{</div><div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;    saveArchive(<a class="code" href="classpepr3d_1_1_geometry.html#a435bf3487105e8fb7867614845d69885">mColorManager</a>);</div><div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;    saveArchive(<a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>);</div><div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;    saveArchive(<a class="code" href="classpepr3d_1_1_geometry.html#a899b65a3e64dc086f6275e4a5b616b62">mTriangleDetails</a>);</div><div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;    saveArchive(<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a83aa9807ec5b6b95395d281dfe788086">vertices</a>);</div><div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;    saveArchive(<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a9cd3b6704df3fb8caae2bd938e6d7de8">indices</a>);</div><div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;}</div><div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;</div><div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> Archive&gt;</div><div class="line"><a name="l00760"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_geometry.html#a2a8b9b75eb5033c9af30570ace03e921">  760</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_geometry.html#a2a8b9b75eb5033c9af30570ace03e921">Geometry::load</a>(Archive&amp; loadArchive) {</div><div class="line"><a name="l00761"></a><span class="lineno">  761</span>&#160;    loadArchive(<a class="code" href="classpepr3d_1_1_geometry.html#a435bf3487105e8fb7867614845d69885">mColorManager</a>);</div><div class="line"><a name="l00762"></a><span class="lineno">  762</span>&#160;    loadArchive(<a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>);</div><div class="line"><a name="l00763"></a><span class="lineno">  763</span>&#160;    loadArchive(<a class="code" href="classpepr3d_1_1_geometry.html#a899b65a3e64dc086f6275e4a5b616b62">mTriangleDetails</a>);</div><div class="line"><a name="l00764"></a><span class="lineno">  764</span>&#160;    loadArchive(<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a83aa9807ec5b6b95395d281dfe788086">vertices</a>);</div><div class="line"><a name="l00765"></a><span class="lineno">  765</span>&#160;    loadArchive(<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a9cd3b6704df3fb8caae2bd938e6d7de8">indices</a>);</div><div class="line"><a name="l00766"></a><span class="lineno">  766</span>&#160;</div><div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;    <span class="comment">// Reset progress</span></div><div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;    <a class="code" href="classpepr3d_1_1_geometry.html#a0bf613cec3cd854058e183f199542ada">mProgress</a>-&gt;resetLoad();</div><div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;</div><div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;    <span class="comment">// Geometry loaded via Cereal</span></div><div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;    <a class="code" href="classpepr3d_1_1_geometry.html#a0bf613cec3cd854058e183f199542ada">mProgress</a>-&gt;importRenderPercentage = 1.0f;</div><div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;    <a class="code" href="classpepr3d_1_1_geometry.html#a0bf613cec3cd854058e183f199542ada">mProgress</a>-&gt;importComputePercentage = 1.0f;</div><div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;</div><div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;    <a class="code" href="classpepr3d_1_1_geometry.html#ad25fda5afe4c73c0fd9dbd4bf77952b1">updateTemporaryDetailedData</a>();</div><div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;</div><div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;    P_ASSERT(!<a class="code" href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">mTriangles</a>.empty());</div><div class="line"><a name="l00777"></a><span class="lineno">  777</span>&#160;    P_ASSERT(!<a class="code" href="classpepr3d_1_1_geometry.html#a435bf3487105e8fb7867614845d69885">mColorManager</a>.<a class="code" href="classpepr3d_1_1_color_manager.html#a439df566020a7f10221a4e4c3fd36e7d">empty</a>());</div><div class="line"><a name="l00778"></a><span class="lineno">  778</span>&#160;    P_ASSERT(!<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a83aa9807ec5b6b95395d281dfe788086">vertices</a>.empty());</div><div class="line"><a name="l00779"></a><span class="lineno">  779</span>&#160;    P_ASSERT(!<a class="code" href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">mPolyhedronData</a>.<a class="code" href="structpepr3d_1_1_polyhedron_data.html#a9cd3b6704df3fb8caae2bd938e6d7de8">indices</a>.empty());</div><div class="line"><a name="l00780"></a><span class="lineno">  780</span>&#160;}</div><div class="line"><a name="l00781"></a><span class="lineno">  781</span>&#160;</div><div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160;}  <span class="comment">// namespace pepr3d</span></div><div class="ttc" id="classpepr3d_1_1_geometry_html_ab9f70b2e8bbd7a9baa001b981c6215aa"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#ab9f70b2e8bbd7a9baa001b981c6215aa">pepr3d::Geometry::mTree</a></div><div class="ttdeci">std::unique_ptr&lt; Tree &gt; mTree</div><div class="ttdoc">AABB tree from the CGAL library, to find intersections with rays generated by user mouse clicks and t...</div><div class="ttdef"><b>Definition:</b> Geometry.h:127</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a1108d0993ef23fb246ae10244a0c2240"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a1108d0993ef23fb246ae10244a0c2240">pepr3d::Geometry::mTreeDetailed</a></div><div class="ttdeci">std::unique_ptr&lt; Tree &gt; mTreeDetailed</div><div class="ttdoc">AABB tree built over all triangles, including details. This tree is invalidated on every operation th...</div><div class="ttdef"><b>Definition:</b> Geometry.h:131</div></div>
<div class="ttc" id="structpepr3d_1_1_geometry_1_1_open_gl_data_html_a5741e251aec5d181e48fbf2d9e56112d"><div class="ttname"><a href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#a5741e251aec5d181e48fbf2d9e56112d">pepr3d::Geometry::OpenGlData::colorBuffer</a></div><div class="ttdeci">std::vector&lt; ColorIndex &gt; colorBuffer</div><div class="ttdoc">Color buffer, keeping the invariant that every triangle has only one color - all three vertices have ...</div><div class="ttdef"><b>Definition:</b> Geometry.h:73</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_aeabf9a91453ddd3d744ccbc862583874"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#aeabf9a91453ddd3d744ccbc862583874">pepr3d::Geometry::gatherNeighbours</a></div><div class="ttdeci">std::array&lt; int, 3 &gt; gatherNeighbours(const size_t triIndex) const</div><div class="ttdoc">Used by BFS in bucket painting. Aggregates the neighbours of the triangle at triIndex by looking into...</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:929</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_aebe9b03fabcd1d3fca4108eaf34c6e70"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#aebe9b03fabcd1d3fca4108eaf34c6e70">pepr3d::Geometry::loadState</a></div><div class="ttdeci">void loadState(const GeometryState &amp;)</div><div class="ttdoc">Load previous state from a struct (CommandManager target requirement)</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:28</div></div>
<div class="ttc" id="structpepr3d_1_1_geometry_1_1_area_highlight_html"><div class="ttname"><a href="structpepr3d_1_1_geometry_1_1_area_highlight.html">pepr3d::Geometry::AreaHighlight</a></div><div class="ttdoc">A highlight of a part of the Geometry.</div><div class="ttdef"><b>Definition:</b> Geometry.h:51</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_ae68a633ab4ab435156e0b03e64c9ede9"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#ae68a633ab4ab435156e0b03e64c9ede9">pepr3d::Geometry::intersectDetailedMesh</a></div><div class="ttdeci">std::optional&lt; DetailedTriangleId &gt; intersectDetailedMesh(const ci::Ray &amp;ray)</div><div class="ttdoc">Intersects the detailed mesh with the given ray and returns the ID of the triangle intersected,...</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:331</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_aa473f80280346656024fc494994c065e"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#aa473f80280346656024fc494994c065e">pepr3d::Geometry::setTriangleColor</a></div><div class="ttdeci">void setTriangleColor(const size_t triangleIndex, const size_t newColor)</div><div class="ttdoc">Set new triangle color.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:613</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a9ffaaaa3702f7505206f4e45aebfd4a9"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a9ffaaaa3702f7505206f4e45aebfd4a9">pepr3d::Geometry::buildPolyhedron</a></div><div class="ttdeci">void buildPolyhedron()</div><div class="ttdoc">Build the CGAL Polyhedron construct in mPolyhedronData. Takes a bit of time to rebuild.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:665</div></div>
<div class="ttc" id="structpepr3d_1_1_polyhedron_data_html_a27477466ca362daaf66ed853405cf959"><div class="ttname"><a href="structpepr3d_1_1_polyhedron_data.html#a27477466ca362daaf66ed853405cf959">pepr3d::PolyhedronData::mMesh</a></div><div class="ttdeci">Mesh mMesh</div><div class="ttdoc">The data-structure itself.</div><div class="ttdef"><b>Definition:</b> PolyhedronData.h:38</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a4a49d4588081ba91381fbd86e3837e75"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a4a49d4588081ba91381fbd86e3837e75">pepr3d::Geometry::bucket</a></div><div class="ttdeci">std::vector&lt; DetailedTriangleId &gt; bucket(const DetailedTriangleId startTriangle, const StoppingCondition &amp;stopFunctor)</div><div class="ttdoc">Spreads as BFS, starting from startTriangle to wherever it can reach. Stopping is handled by the Stop...</div><div class="ttdef"><b>Definition:</b> Geometry.h:653</div></div>
<div class="ttc" id="namespacepepr3d_html"><div class="ttname"><a href="namespacepepr3d.html">pepr3d</a></div><div class="ttdoc">Fix for CGAL bugs in polygon with holes verification Contained in CGAL PR #3688, likely to be in 4....</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:9</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_aa82245c699bf946457e251ad1176926c"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#aa82245c699bf946457e251ad1176926c">pepr3d::Geometry::getTriangleDetailCount</a></div><div class="ttdeci">size_t getTriangleDetailCount(const size_t triangleIndex) const</div><div class="ttdoc">Get number of detailed triangles for this baseId.</div><div class="ttdef"><b>Definition:</b> Geometry.h:484</div></div>
<div class="ttc" id="classpepr3d_1_1_color_manager_html_a439df566020a7f10221a4e4c3fd36e7d"><div class="ttname"><a href="classpepr3d_1_1_color_manager.html#a439df566020a7f10221a4e4c3fd36e7d">pepr3d::ColorManager::empty</a></div><div class="ttdeci">bool empty() const</div><div class="ttdoc">Returns true iff no colors are currently used.</div><div class="ttdef"><b>Definition:</b> ColorManager.h:58</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a993a7383980e9c4aa955ae156d714f15"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a993a7383980e9c4aa955ae156d714f15">pepr3d::Geometry::isTriangleInRadius</a></div><div class="ttdeci">bool isTriangleInRadius(const Object &amp;object, double radius, size_t triangleIdx) const</div><div class="ttdoc">Test if distance from object to spherical boundary of a triangle is closer than radius.</div><div class="ttdef"><b>Definition:</b> Geometry.h:428</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a435bf3487105e8fb7867614845d69885"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a435bf3487105e8fb7867614845d69885">pepr3d::Geometry::mColorManager</a></div><div class="ttdeci">ColorManager mColorManager</div><div class="ttdoc">A vector based map mapping size_t into ci::ColorA.</div><div class="ttdef"><b>Definition:</b> Geometry.h:149</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a2a8b9b75eb5033c9af30570ace03e921"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a2a8b9b75eb5033c9af30570ace03e921">pepr3d::Geometry::load</a></div><div class="ttdeci">void load(Archive &amp;loadArchive)</div><div class="ttdoc">Method to allow the Cereal library to deserialize this class. Used for loading a ....</div><div class="ttdef"><b>Definition:</b> Geometry.h:760</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_af247be6afb090aa4edecb32786103ae1"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#af247be6afb090aa4edecb32786103ae1">pepr3d::Geometry::mBoundingBox</a></div><div class="ttdeci">std::unique_ptr&lt; BoundingBox &gt; mBoundingBox</div><div class="ttdoc">AABB of the whole mesh.</div><div class="ttdef"><b>Definition:</b> Geometry.h:146</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a5f0594ebe7f3a779dc9cf18f943f1c56"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a5f0594ebe7f3a779dc9cf18f943f1c56">pepr3d::Geometry::buildDetailedMesh</a></div><div class="ttdeci">void buildDetailedMesh()</div><div class="ttdoc">Build a CGAL mesh over detailed triangles.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:746</div></div>
<div class="ttc" id="structpepr3d_1_1_polyhedron_data_html_a18c628197dc544d7a79b636792783c31"><div class="ttname"><a href="structpepr3d_1_1_polyhedron_data.html#a18c628197dc544d7a79b636792783c31">pepr3d::PolyhedronData::sdf_property_map</a></div><div class="ttdeci">PolyhedronData::Mesh::Property_map&lt; PolyhedronData::face_descriptor, double &gt; sdf_property_map</div><div class="ttdoc">Map converting a face_descriptor into the SDF value of the given face. Note: the SDF values are linea...</div><div class="ttdef"><b>Definition:</b> PolyhedronData.h:32</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a80198ecc7f17d1db360ab2bf50b7f594"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a80198ecc7f17d1db360ab2bf50b7f594">pepr3d::Geometry::saveState</a></div><div class="ttdeci">GeometryState saveState() const</div><div class="ttdoc">Save current state into a struct so that it can be restored later (CommandManager target requirement)</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:17</div></div>
<div class="ttc" id="structpepr3d_1_1_geometry_1_1_open_gl_data_html_ad66b73ae688939f518a57411a9f02671"><div class="ttname"><a href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ad66b73ae688939f518a57411a9f02671">pepr3d::Geometry::OpenGlData::indexBuffer</a></div><div class="ttdeci">std::vector&lt; uint32_t &gt; indexBuffer</div><div class="ttdoc">Index buffer for OpenGL frontend., specifying the same triangles as in mTriangles.</div><div class="ttdef"><b>Definition:</b> Geometry.h:80</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_ad25fda5afe4c73c0fd9dbd4bf77952b1"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#ad25fda5afe4c73c0fd9dbd4bf77952b1">pepr3d::Geometry::updateTemporaryDetailedData</a></div><div class="ttdeci">void updateTemporaryDetailedData()</div><div class="ttdoc">Update temporary detailed data like detailed AABB tree and detailed Mesh This is a slow operation.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:910</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_ac0ccbc4a83e4eeaa61fd3a7de4e0e7a9"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#ac0ccbc4a83e4eeaa61fd3a7de4e0e7a9">pepr3d::Geometry::generateIndexBuffer</a></div><div class="ttdeci">void generateIndexBuffer()</div><div class="ttdoc">Generating a linear index buffer, since we do not reuse any vertices.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:172</div></div>
<div class="ttc" id="structpepr3d_1_1_geometry_progress_html"><div class="ttname"><a href="structpepr3d_1_1_geometry_progress.html">pepr3d::GeometryProgress</a></div><div class="ttdoc">Atomic values representing percentage progress of geometry import, export, and SDF computation.</div><div class="ttdef"><b>Definition:</b> GeometryProgress.h:8</div></div>
<div class="ttc" id="structpepr3d_1_1_polyhedron_data_html"><div class="ttname"><a href="structpepr3d_1_1_polyhedron_data.html">pepr3d::PolyhedronData</a></div><div class="ttdoc">CGAL Polyhedron data of the Geometry.</div><div class="ttdef"><b>Definition:</b> PolyhedronData.h:9</div></div>
<div class="ttc" id="structpepr3d_1_1_geometry_1_1_open_gl_data_html_a8c61b7f1139d0a7fa632ab221546e81b"><div class="ttname"><a href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#a8c61b7f1139d0a7fa632ab221546e81b">pepr3d::Geometry::OpenGlData::highlightMask</a></div><div class="ttdeci">std::vector&lt; GLint &gt; highlightMask</div><div class="ttdoc">boolen for each triangle that indicates if the triangle should display cursor highlight Used to limit...</div><div class="ttdef"><b>Definition:</b> Geometry.h:84</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_aa084c208c8fcb9802d5afd68e72b527d"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#aa084c208c8fcb9802d5afd68e72b527d">pepr3d::Geometry::getTriangleDetailCount</a></div><div class="ttdeci">size_t getTriangleDetailCount(const DetailedTriangleId triangleIndex) const</div><div class="ttdoc">Get number of detailed triangles for this baseId.</div><div class="ttdef"><b>Definition:</b> Geometry.h:479</div></div>
<div class="ttc" id="classpepr3d_1_1_triangle_detail_html"><div class="ttname"><a href="classpepr3d_1_1_triangle_detail.html">pepr3d::TriangleDetail</a></div><div class="ttdoc">Represents additional triangles that replace the original one.</div><div class="ttdef"><b>Definition:</b> TriangleDetail.h:51</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_aee03bb37cbf326e4594b58edacbc17c0"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#aee03bb37cbf326e4594b58edacbc17c0">pepr3d::Geometry::mTriangleDetailColorBufferStart</a></div><div class="ttdeci">std::map&lt; size_t, size_t &gt; mTriangleDetailColorBufferStart</div><div class="ttdoc">Map of baseTriangleId -&gt; Index of first detail triangle color in mOgl.colorBuffer.</div><div class="ttdef"><b>Definition:</b> Geometry.h:118</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a1550192711eb10ddb685c08d15ef9922"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a1550192711eb10ddb685c08d15ef9922">pepr3d::Geometry::updateOpenGlBuffers</a></div><div class="ttdeci">void updateOpenGlBuffers()</div><div class="ttdoc">Update buffers used by openGl. Should only be called when they are dirty.</div><div class="ttdef"><b>Definition:</b> Geometry.h:209</div></div>
<div class="ttc" id="structpepr3d_1_1_geometry_1_1_open_gl_data_html_ae087e1484346b1ef7af7f04e6d745745"><div class="ttname"><a href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ae087e1484346b1ef7af7f04e6d745745">pepr3d::Geometry::OpenGlData::vertexBuffer</a></div><div class="ttdeci">std::vector&lt; glm::vec3 &gt; vertexBuffer</div><div class="ttdoc">Vertex buffer with the same data as mTriangles for OpenGL to render the mesh. Contains position and c...</div><div class="ttdef"><b>Definition:</b> Geometry.h:68</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a2ab785869db636d7dc75d192cbd34c30"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a2ab785869db636d7dc75d192cbd34c30">pepr3d::Geometry::mTriangleBounds</a></div><div class="ttdeci">std::vector&lt; std::pair&lt; Point3, double &gt; &gt; mTriangleBounds</div><div class="ttdoc">Stores a rough collision sphere for each triangle in a form of a center point + radius....</div><div class="ttdef"><b>Definition:</b> Geometry.h:112</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a93545e8dae1b2cfee74fbd8c7e203389"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a93545e8dae1b2cfee74fbd8c7e203389">pepr3d::Geometry::generateColorBuffer</a></div><div class="ttdeci">void generateColorBuffer()</div><div class="ttdoc">Generating triplets of colors, since we only allow a single-colored triangle.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:181</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a1f4435ad35840859cbb4dd949af46845"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a1f4435ad35840859cbb4dd949af46845">pepr3d::Geometry::generateTriangleBounds</a></div><div class="ttdeci">void generateTriangleBounds()</div><div class="ttdoc">Generate spherical bounds for each original triangle. Used to speed up capsule querries.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:278</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_acca576cfa8a735ecfe36e4fca67204d8"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#acca576cfa8a735ecfe36e4fca67204d8">pepr3d::Geometry::getTriangleCount</a></div><div class="ttdeci">size_t getTriangleCount() const</div><div class="ttdoc">Return the number of triangles in the whole mesh.</div><div class="ttdef"><b>Definition:</b> Geometry.h:288</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_ae72aa9945025d6609ef0fe5beab238f9"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#ae72aa9945025d6609ef0fe5beab238f9">pepr3d::Geometry::mTriangles</a></div><div class="ttdeci">std::vector&lt; DataTriangle &gt; mTriangles</div><div class="ttdoc">Triangle soup of the original model mesh, containing CGAL::Triangle_3 data for AABB tree.</div><div class="ttdef"><b>Definition:</b> Geometry.h:107</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a531c94e0221f47462af2c9b5f0961e56"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a531c94e0221f47462af2c9b5f0961e56">pepr3d::Geometry::save</a></div><div class="ttdeci">void save(Archive &amp;saveArchive) const</div><div class="ttdoc">Method to allow the Cereal library to serialize this class. Used for saving a .p3d project.</div><div class="ttdef"><b>Definition:</b> Geometry.h:751</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a3c89c3e2f698d1cb25ad68767b90efc3"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a3c89c3e2f698d1cb25ad68767b90efc3">pepr3d::Geometry::generateVertexBuffer</a></div><div class="ttdeci">void generateVertexBuffer()</div><div class="ttdoc">Generates the vertex buffer linearly - adding each vertex of each triangle as a new one....</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:142</div></div>
<div class="ttc" id="classpepr3d_1_1_color_manager_html"><div class="ttname"><a href="classpepr3d_1_1_color_manager.html">pepr3d::ColorManager</a></div><div class="ttdoc">Represents a color palette, i.e., all colors and a selected active color.</div><div class="ttdef"><b>Definition:</b> ColorManager.h:16</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_aff6b12b0be4f64925e3a9aa88b85bb09"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#aff6b12b0be4f64925e3a9aa88b85bb09">pepr3d::Geometry::buildTree</a></div><div class="ttdeci">void buildTree()</div><div class="ttdoc">Builds AABB tree over the original mesh.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:103</div></div>
<div class="ttc" id="structpepr3d_1_1_polyhedron_data_html_a405c876987a078bc168f267972b46514"><div class="ttname"><a href="structpepr3d_1_1_polyhedron_data.html#a405c876987a078bc168f267972b46514">pepr3d::PolyhedronData::mFaceDescs</a></div><div class="ttdeci">std::vector&lt; PolyhedronData::face_descriptor &gt; mFaceDescs</div><div class="ttdoc">A &quot;map&quot; converting the ID of each triangle (from mTriangles) into a face_descriptor.</div><div class="ttdef"><b>Definition:</b> PolyhedronData.h:35</div></div>
<div class="ttc" id="structpepr3d_1_1_detailed_triangle_id_html"><div class="ttname"><a href="structpepr3d_1_1_detailed_triangle_id.html">pepr3d::DetailedTriangleId</a></div><div class="ttdoc">Triangle ID in all detailed triangles Face index in mMeshDetailed faces;.</div><div class="ttdef"><b>Definition:</b> TrianglePrimitive.h:10</div></div>
<div class="ttc" id="structpepr3d_1_1_polyhedron_data_html_a9cd3b6704df3fb8caae2bd938e6d7de8"><div class="ttname"><a href="structpepr3d_1_1_polyhedron_data.html#a9cd3b6704df3fb8caae2bd938e6d7de8">pepr3d::PolyhedronData::indices</a></div><div class="ttdeci">std::vector&lt; std::array&lt; size_t, 3 &gt; &gt; indices</div><div class="ttdoc">Indices to triangles of the polyhedron. Indices are stored in a CCW order, as imported from Assimp.</div><div class="ttdef"><b>Definition:</b> PolyhedronData.h:15</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a040e500c0481caafb88141d8e42128bb"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a040e500c0481caafb88141d8e42128bb">pepr3d::Geometry::mPolyhedronData</a></div><div class="ttdeci">PolyhedronData mPolyhedronData</div><div class="ttdoc">Polyhedron structure.</div><div class="ttdef"><b>Definition:</b> Geometry.h:124</div></div>
<div class="ttc" id="structpepr3d_1_1_geometry_1_1_open_gl_data_html"><div class="ttname"><a href="structpepr3d_1_1_geometry_1_1_open_gl_data.html">pepr3d::Geometry::OpenGlData</a></div><div class="ttdoc">All OpenGL buffers of the Geometry.</div><div class="ttdef"><b>Definition:</b> Geometry.h:65</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_ad9cad69d72176d09ebb2f345ca862b01"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#ad9cad69d72176d09ebb2f345ca862b01">pepr3d::Geometry::Geometry</a></div><div class="ttdeci">Geometry()</div><div class="ttdoc">Empty constructor.</div><div class="ttdef"><b>Definition:</b> Geometry.h:167</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a47baed18f665dbbe1c69b9b400ace85c"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a47baed18f665dbbe1c69b9b400ace85c">pepr3d::Geometry::mAreaHighlight</a></div><div class="ttdeci">AreaHighlight mAreaHighlight</div><div class="ttdoc">Struct representing a highlight around user's cursor.</div><div class="ttdef"><b>Definition:</b> Geometry.h:152</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a73e2b6c74082b59b5d99d58e018e5bff"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a73e2b6c74082b59b5d99d58e018e5bff">pepr3d::Geometry::mMeshDetailed</a></div><div class="ttdeci">std::unique_ptr&lt; PolyhedronData::Mesh &gt; mMeshDetailed</div><div class="ttdoc">Surface mesh with detail triangles included.</div><div class="ttdef"><b>Definition:</b> Geometry.h:136</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a69f784973726ce83893d8ec3fcdf9ff1"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a69f784973726ce83893d8ec3fcdf9ff1">pepr3d::Geometry::highlightArea</a></div><div class="ttdeci">void highlightArea(const ci::Ray &amp;ray, const struct BrushSettings &amp;settings)</div><div class="ttdoc">Highlight an area around the intersection point. All points on a continuous surface closer than the s...</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:421</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a027715ec109b060ffc8b420947c4fde0"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a027715ec109b060ffc8b420947c4fde0">pepr3d::Geometry::loadNewGeometry</a></div><div class="ttdeci">void loadNewGeometry(const std::string &amp;fileName)</div><div class="ttdoc">Loads new geometry into the private data, rebuilds the buffers and other data structures automaticall...</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:113</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a7d69aae6b0c09c7727d170af8b8b99b2"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a7d69aae6b0c09c7727d170af8b8b99b2">pepr3d::Geometry::generateNormalBuffer</a></div><div class="ttdeci">void generateNormalBuffer()</div><div class="ttdoc">Generate a buffer of normals. Generates only &quot;triangle normals&quot; - all three vertices have the same no...</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:209</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a0bf613cec3cd854058e183f199542ada"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a0bf613cec3cd854058e183f199542ada">pepr3d::Geometry::mProgress</a></div><div class="ttdeci">std::unique_ptr&lt; GeometryProgress &gt; mProgress</div><div class="ttdoc">Current progress of import, tree, polyhedron building, export, etc.</div><div class="ttdef"><b>Definition:</b> Geometry.h:155</div></div>
<div class="ttc" id="structpepr3d_1_1_brush_settings_html"><div class="ttname"><a href="structpepr3d_1_1_brush_settings.html">pepr3d::BrushSettings</a></div><div class="ttdoc">Current settings of the Brush tool.</div><div class="ttdef"><b>Definition:</b> Brush.h:10</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a7671cab77f226a80cbea5703aba2026c"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a7671cab77f226a80cbea5703aba2026c">pepr3d::Geometry::recomputeFromData</a></div><div class="ttdeci">void recomputeFromData()</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:50</div></div>
<div class="ttc" id="structpepr3d_1_1_geometry_1_1_area_highlight_html_a129df0b43636f676500fdf0beb3cd021"><div class="ttname"><a href="structpepr3d_1_1_geometry_1_1_area_highlight.html#a129df0b43636f676500fdf0beb3cd021">pepr3d::Geometry::AreaHighlight::dirty</a></div><div class="ttdeci">bool dirty</div><div class="ttdoc">Do we need to upload new data to the gpu.</div><div class="ttdef"><b>Definition:</b> Geometry.h:61</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a1d420e96bc8c92c620b5473677173d81"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a1d420e96bc8c92c620b5473677173d81">pepr3d::Geometry::getTrianglesUnderBrush</a></div><div class="ttdeci">std::vector&lt; size_t &gt; getTrianglesUnderBrush(const glm::vec3 &amp;originPoint, const glm::vec3 &amp;insideDirection, size_t startTriangle, const struct BrushSettings &amp;settings)</div><div class="ttdoc">Spread as BFS from starting triangle, until the limits of brush settings are reached.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:368</div></div>
<div class="ttc" id="structpepr3d_1_1_geometry_1_1_open_gl_data_1_1_info_html"><div class="ttname"><a href="structpepr3d_1_1_geometry_1_1_open_gl_data_1_1_info.html">pepr3d::Geometry::OpenGlData::Info</a></div><div class="ttdoc">Always editable struct that keeps track of changes since last frame Updates to color/highlight buffer...</div><div class="ttdef"><b>Definition:</b> Geometry.h:91</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_abba4d7a86b23f0d1a5aef9739d087f7d"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#abba4d7a86b23f0d1a5aef9739d087f7d">pepr3d::Geometry::computeSdfValues</a></div><div class="ttdeci">void computeSdfValues()</div><div class="ttdoc">Segmentation is CPU heavy because it needs to calculate a lot of data. This method allows to pre-comp...</div><div class="ttdef"><b>Definition:</b> Geometry.h:447</div></div>
<div class="ttc" id="structpepr3d_1_1_polyhedron_data_html_a83aa9807ec5b6b95395d281dfe788086"><div class="ttname"><a href="structpepr3d_1_1_polyhedron_data.html#a83aa9807ec5b6b95395d281dfe788086">pepr3d::PolyhedronData::vertices</a></div><div class="ttdeci">std::vector&lt; glm::vec3 &gt; vertices</div><div class="ttdoc">Vertex positions after joining all identical vertices. This is after removing all other componens and...</div><div class="ttdef"><b>Definition:</b> PolyhedronData.h:12</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_aa981414573779195fbfb7a64cfcbc1f1"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#aa981414573779195fbfb7a64cfcbc1f1">pepr3d::Geometry::correctSharedVertices</a></div><div class="ttdeci">void correctSharedVertices()</div><div class="ttdoc">Fixes T-junctions and unmatched vertices on edges of TriangleDetails by creating a matching vertex on...</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:844</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_ae361aadf7f7b305ec57f7d0c3f5ec076"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#ae361aadf7f7b305ec57f7d0c3f5ec076">pepr3d::Geometry::addNeighboursToQueue</a></div><div class="ttdeci">void addNeighboursToQueue(const size_t currentVertex, std::unordered_set&lt; size_t &gt; &amp;alreadyVisited, std::deque&lt; size_t &gt; &amp;toVisit, const StoppingCondition &amp;stopFunctor) const</div><div class="ttdoc">Used by BFS in bucket painting. Manages the queue used to search through the graph.</div><div class="ttdef"><b>Definition:</b> Geometry.h:709</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html"><div class="ttname"><a href="classpepr3d_1_1_geometry.html">pepr3d::Geometry</a></div><div class="ttdoc">The whole geometry of a model that the user is painting.</div><div class="ttdef"><b>Definition:</b> Geometry.h:34</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_ace58dc7a4182240000e9b773cb8da4ee"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#ace58dc7a4182240000e9b773cb8da4ee">pepr3d::Geometry::intersectMesh</a></div><div class="ttdeci">std::optional&lt; size_t &gt; intersectMesh(const ci::Ray &amp;ray) const</div><div class="ttdoc">Intersects the mesh with the given ray and returns the index of the triangle intersected,...</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:288</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a6c6b8ef6f157f8bb818e38f6e2e49b37"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a6c6b8ef6f157f8bb818e38f6e2e49b37">pepr3d::Geometry::paintWithShape</a></div><div class="ttdeci">void paintWithShape(const ci::Ray &amp;ray, const std::vector&lt; Point3 &gt; &amp;shape, size_t color, bool paintBackfaces=false)</div><div class="ttdoc">Paint area with a shaped brush.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:456</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a69f341b26bd3ebd9158648b7d35ffa10"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a69f341b26bd3ebd9158648b7d35ffa10">pepr3d::Geometry::invalidateTemporaryDetailedData</a></div><div class="ttdeci">void invalidateTemporaryDetailedData()</div><div class="ttdoc">Invalidate temporary detailed data like detailed AABB tree and mesh.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:924</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_ab4593a2aa8017add96d6cd7e177a0cf1"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#ab4593a2aa8017add96d6cd7e177a0cf1">pepr3d::Geometry::paintAreaWithSphere</a></div><div class="ttdeci">void paintAreaWithSphere(const ci::Ray &amp;ray, const BrushSettings &amp;settings)</div><div class="ttdoc">Paint continuous spherical area with a brush of specified size.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:544</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a899b65a3e64dc086f6275e4a5b616b62"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a899b65a3e64dc086f6275e4a5b616b62">pepr3d::Geometry::mTriangleDetails</a></div><div class="ttdeci">std::map&lt; size_t, TriangleDetail &gt; mTriangleDetails</div><div class="ttdoc">Map of triangle details. (Detailed triangles that replace the original)</div><div class="ttdef"><b>Definition:</b> Geometry.h:115</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_addf4b4de09e100d6e4279d21e01a05eb"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#addf4b4de09e100d6e4279d21e01a05eb">pepr3d::Geometry::mOgl</a></div><div class="ttdeci">OpenGlData mOgl</div><div class="ttdoc">All open GL buffers.</div><div class="ttdef"><b>Definition:</b> Geometry.h:121</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a36740d72ad8b50c81f39ad506fa0281e"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a36740d72ad8b50c81f39ad506fa0281e">pepr3d::Geometry::generateHighlightBuffer</a></div><div class="ttdeci">void generateHighlightBuffer()</div><div class="ttdoc">Generate a buffer of highlight information. Saves per-triangle data to each vertex.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:232</div></div>
<div class="ttc" id="structpepr3d_1_1_geometry_1_1_geometry_state_html"><div class="ttname"><a href="structpepr3d_1_1_geometry_1_1_geometry_state.html">pepr3d::Geometry::GeometryState</a></div><div class="ttdef"><b>Definition:</b> Geometry.h:157</div></div>
<div class="ttc" id="classpepr3d_1_1_triangle_detail_html_a9bce9da8bea065df486537a2933f635c"><div class="ttname"><a href="classpepr3d_1_1_triangle_detail.html#a9bce9da8bea065df486537a2933f635c">pepr3d::TriangleDetail::changeColorIds</a></div><div class="ttdeci">void changeColorIds(const ColorFunc &amp;colorFunc)</div><div class="ttdoc">Change color IDs of this detail.</div><div class="ttdef"><b>Definition:</b> TriangleDetail.h:310</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a4907bc6f193156a3d68956b2ce622120"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a4907bc6f193156a3d68956b2ce622120">pepr3d::Geometry::getTrianglesInRadius</a></div><div class="ttdeci">std::vector&lt; size_t &gt; getTrianglesInRadius(const Object &amp;object, double radius) const</div><div class="ttdoc">Get all triangles that are closer to the object than radius This function operates on spherical bound...</div><div class="ttdef"><b>Definition:</b> Geometry.h:412</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a11091a0db475dc20b6635f17afb07b23"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a11091a0db475dc20b6635f17afb07b23">pepr3d::Geometry::buildDetailedTree</a></div><div class="ttdeci">void buildDetailedTree()</div><div class="ttdoc">Build AABB Tree over all triangles including details.</div><div class="ttdef"><b>Definition:</b> Geometry.cpp:725</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_ae6d2ae86fca37592a5dbb93784ca4ef0"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#ae6d2ae86fca37592a5dbb93784ca4ef0">pepr3d::Geometry::changeColorIds</a></div><div class="ttdeci">void changeColorIds(const ColorFunc &amp;colorFunc)</div><div class="ttdoc">Change all color ID's from one to another.</div><div class="ttdef"><b>Definition:</b> Geometry.h:371</div></div>
<div class="ttc" id="structpepr3d_1_1_geometry_1_1_open_gl_data_html_ab1e3327043c8d4e8924495db62eb2ad9"><div class="ttname"><a href="structpepr3d_1_1_geometry_1_1_open_gl_data.html#ab1e3327043c8d4e8924495db62eb2ad9">pepr3d::Geometry::OpenGlData::normalBuffer</a></div><div class="ttdeci">std::vector&lt; glm::vec3 &gt; normalBuffer</div><div class="ttdoc">Normal buffer, the triangle has same normal for its every vertex. It is aligned with the vertex buffe...</div><div class="ttdef"><b>Definition:</b> Geometry.h:77</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_adf2777044b00de455536e8bc0efc3b07"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#adf2777044b00de455536e8bc0efc3b07">pepr3d::Geometry::mMeshDetailedIdMap</a></div><div class="ttdeci">PolyhedronData::Mesh::Property_map&lt; PolyhedronData::face_descriptor, DetailedTriangleId &gt; mMeshDetailedIdMap</div><div class="ttdoc">Map converting a face_descriptor into an ID.</div><div class="ttdef"><b>Definition:</b> Geometry.h:141</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_a4acf91e1482adf0a1a77d03c23c108b3"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#a4acf91e1482adf0a1a77d03c23c108b3">pepr3d::Geometry::isSdfComputed</a></div><div class="ttdeci">bool isSdfComputed() const</div><div class="ttdoc">Segmentation algorithms will not work if SDF values are not pre-computed.</div><div class="ttdef"><b>Definition:</b> Geometry.h:452</div></div>
<div class="ttc" id="classpepr3d_1_1_geometry_html_ab4ef6e071146e7fd4e06c26dac3ffb43"><div class="ttname"><a href="classpepr3d_1_1_geometry.html#ab4ef6e071146e7fd4e06c26dac3ffb43">pepr3d::Geometry::segmentation</a></div><div class="ttdeci">size_t segmentation(const int numberOfClusters, const float smoothingLambda, std::map&lt; size_t, std::vector&lt; size_t &gt;&gt; &amp;segmentToTriangleIds, std::unordered_map&lt; size_t, size_t &gt; &amp;triangleToSegmentMap)</div><div class="ttdoc">Once SDF is computed, segment the whole SurfaceMesh automatically.</div><div class="ttdef"><b>Definition:</b> Geometry.h:463</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_405fd32de3649961a5f009c7a3fe84df.html">geometry</a></li><li class="navelem"><b>Geometry.h</b></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
